<#include "*/component/Tags.ftl"/>
<@Title/>
<@ClassAnnotation>
@Data
@SqlTarget(target = "${entity.table.name} ${entity.table.alias}")
@SqlTableAlias(alias = "${entity.table.alias}")
</@ClassAnnotation>
<@Class extends='BaseUpdateDTO'>

${'\t'}@Getter
${'\t'}@SqlTableAlias(aliasFromClass = ${clazz.name}.class)
${'\t'}public static class UpdateCondition extends NotDeleteCondition {

${'\t'}${'\t'}/**
${'\t'}${'\t'}* 主键
${'\t'}${'\t'}*/
${'\t'}${'\t'}@SqlColumn(name = "${entity.primaryField.column.name}")
${'\t'}${'\t'}@SqlCondition(nullable = false)
${'\t'}${'\t'}private ${entity.primaryField.type} ${entity.primaryField.name};

${'\t'}${'\t'}public UpdateCondition(${entity.primaryField.type} id) {
${'\t'}${'\t'}${'\t'}this.${entity.primaryField.name} = id;
${'\t'}${'\t'}}

${'\t'}}

<#list entity.fields as field>
<@Field field=field type=2 >
${'\t'}@SqlColumn(name = "${field.column.name}"<#if !field.column.nullable>, setNullable = false</#if>)
</@Field>
</#list>
${'\t'}/**
${'\t'}* 逻辑删除标志 0未删除 1删除
${'\t'}*/
${'\t'}@ApiModelProperty(value = "逻辑删除标志 0未删除 1删除")
${'\t'}@SqlColumn(name = "deleted", setNullable = false)
${'\t'}private Boolean deleted;

${'\t'}public ${clazz.name}() {

${'\t'}}

${'\t'}public  ${clazz.name}(Date updateTime) {
${'\t'}${'\t'}super(updateTime);
${'\t'}}

</@Class>
